package safeCommitter.core.progress;

import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Cursor;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;

public class SCProgressMonitorDialog extends ProgressMonitorDialog {

	public SCProgressMonitorDialog(final Shell parent) {
		super(parent);
	}

	private Button continueCommit;

	private Cursor arrowCursor2;

	@Override
	protected void createButtonsForButtonBar(final Composite parent) {
		super.createButtonsForButtonBar(parent);
		createContinueButton(parent);
	}

	protected void createContinueButton(final Composite parent) {
		continueCommit = createButton(parent, IDialogConstants.SKIP_ID, "Commit", true);
		if (arrowCursor2 == null) {
			arrowCursor2 = new Cursor(cancel.getDisplay(), SWT.CURSOR_ARROW);
		}
		continueCommit.setCursor(arrowCursor2);
	}

}
